<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
				<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="myApp">
			<input type="text" v-model="name">
			<button @click="login" type="button">登录</button>
		</div>
	</body>
	<script>
	     new Vue({
			  el:'#myApp',
			  data:{
					name:""
			  },
			  methods:{
				  login:function(){
					 //本地存储
					 localStorage.setItem("name",this.name);
					 //页面跳转
					 location.href="7-挂载事件(文档加载).html";
				  }
			  }
		 })
	</script>
</html>
